package config;

import exceptions.KeyLanguageExc;
import exceptions.PositionLanguage;

public class TestLanguage {

	public static void main(String[] args) {
		Language prueba = new Language();

		Config miConfig = Config.getInstance();

		String l1 = miConfig.getLangIn();
		String l2 = miConfig.getLangOut();
		prueba.LoadInternationalIn(l1);
		prueba.LoadInternationalOut(l2);

		String p1;
		String p2;
		
			try {
				p1 = prueba.getStringLangIn("007", 0);
				System.out.println(p1);
				p2 = prueba.getStringLangOut("004", 11);
				System.out.println(p2);
			} catch (PositionLanguage e) {
				e.printStackTrace();
			} catch (KeyLanguageExc e) {
				e.printStackTrace();
			}
			
		//Funcionament utilitzant els atributs de la classe Language
			System.out.println(prueba.getCloseOpen()[0]);
			System.out.println(prueba.getSchedule());
			

			prueba.LoadInternationalIn(l1);
			System.out.println(prueba.getCloseOpen()[0]);
			System.out.println(prueba.getSchedule());

	}

}
